<!DOCTYPE html>
<!--[if lt IE 7 ]>  <html class="ie6">     <![endif]-->
<!--[if IE 7 ]>     <html class="ie7">     <![endif]-->
<!--[if IE 8 ]>     <html class="ie8">     <![endif]-->
<!--[if IE 9 ]>     <html class="ie9">     <![endif]-->
<!--[!(IE)]><!-->   <html class="modern">  <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="Content-language" content="zh-CN">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<?php echo isset($metas) ? $metas : null ?>
<?php $pvtitle = isset($pvtitle) && $pvtitle ? $pvtitle . ' ' : '';?>
<?php if (isset($docKeywords) && $docKeywords):?>
<meta name="keywords" content="<?php echo $pvtitle . ($docKeywords) ?>">
<?php endif ?>
<?php if (isset($docDescription) && $docDescription):?>
<meta name="description" content="<?php echo $pvtitle . ($docDescription) ?>">
<?php endif ?>
<title><?php $keyword = isset($keyword) ? $keyword : null; echo isset($docTitle) && $docTitle ? str_replace('{keyword}', $keyword, $pvtitle . $docTitle) : L('default_meta_title'); ?></title>
<link href="http://www.ownonly.com//favicon.ico" type="image/x-icon" rel="icon">
<link href="http://www.ownonly.com//favicon.ico" type="image/x-icon" rel="shortcut icon">
<!-- build:css /statics/front/pkg/css/refer-friend.css -->
<link href="/statics/front/css/base.css" rel="stylesheet">
<link href="/statics/front/css/common.css" rel="stylesheet">
<link href="/web/Tpl/default/special/refer-friend/css/style.css?v=20160205" rel="stylesheet">
<!-- endbuild -->
</head>
<body>
<div class="auto align-center bg-silver refer-friend">
  <div class="dib rel banner">
    <img src="/web/Tpl/default/special/refer-friend/img/banner1.jpg" alt="恭贺新禧，送您200元红包">
    <p class="abs"><strong>恭贺新禧</strong>送您200元红包</p>
  </div>
  <p class="mt1x font-lg">恭喜您获得价值200元的优惠码</p>
  <div class="db auto mt1x mb1x coupon-box">
    <?php if(check_wap()){?>
    <span>优惠券</span>
    <p><?php echo $coupon;?></p>
    <i class="icon sawtooth left"></i>
    <i class="icon sawtooth right"></i>
    <?php }else{//pc端显示二维码?>
    <img src="<?php echo $qrcode;?>">
    <?php }?>
  </div>
  <?php if(!check_wap()){ ?>
  <p class="mb1x">扫描二维码查看优惠码</p>
  <?php } ?>
  <p class="font-lg">优惠码可以在购物时抵扣相应金额</p>
  <?php if($info_use):?>
  <ul class="mt2x auto users">
    <?php foreach($info_use as $v):?>
    <li class="mb1x">
      <img src="/web/Tpl/default/special/refer-friend/img/avatar.png" alt="用户头像" class="dib vm">
      <p class="dib align-left vm">您的好友<?php echo $v['invited_mobile']?>，使用了您分享的优惠券，100元余额存入您的帐户。</p>
    </li>
    <?php endforeach;?>
  </ul>
  <?php endif;?>
  <?php if(check_wap()){?>
  <a href="<?php echo url('index/shopping')?>" class="mt1x mb2x btn btn-link">立即享用优惠</a>
  <?php }?>
  <?php if(check_wap()){?>
  <p class="auto graphic-tip">点击右上角分享，领取现金<i></i></p>
  <?php }?>
  <div class="rel mt1x pb3x font-md activity-desc js-activity-desc">
    <span>? 活动说明</span>
    <div class="abs auto align-left desc">
      <strong class="db black normal">活动说明：</strong>
      <p>1. 输入手机号码，领取价值200元的优惠券（每个手机号限领一次）；</p>
      <p>2. 将该页面分享至朋友圈或发送给好友，好友也可获得优惠码；</p>
      <p class="mb1x">3. 好友使用优惠码后，您的账户中会充入100元余额（不设上限）。</p>
      <strong class="db black normal">优惠券使用规则：</strong>
      <p>1）购买399元以上商品，在结算页面输入优惠码，结算时抵扣200元；</p>
      <p class="mb1x">2）优惠码在获得后，180天以内有效。</p>
      <strong class="db black normal">余额使用规则：</strong>
      <p>1）登录个人账户；</p>
      <p>2）选择商品后，在结算页面选择“使用账户余额”，抵扣相应金额。</p>
    </div>
  </div>
</div>
<script src="/statics/front/js/lib/jquery/1.9.1/jquery.js"></script>
<script>
$(function () {
  $('.js-refer-friend-form').on('submit', function () {
    var $form = $(this),
        $cellphone = $form.find('input[name=cellphone]'),
        cellphone = $cellphone.val(),
        reg = {
          empty: /^\s*$/,
          cellphone: /^0{0,1}(13[0-9]|15[3-9]|15[0-2]|18[0-9])[0-9]{8}$/
        };

    if ( reg.empty.test(cellphone) || !reg.cellphone.test(cellphone)) {
      $cellphone.addClass('error');
      return false;
    } else {
      $cellphone.removeClass('error');
      return true;
    }

    return false;
  })
  .on('focus', 'input[name=cellphone]', function () {
    $(this).removeClass('error');
  });

  $('.js-activity-desc').on('click', '> span', function () {
    $(this).next().slideToggle();
  });

  $(document).on('click', function (event) {
    var $target = $(event.target);
    if (!$target.hasClass('js-activity-desc') && !$target.closest('.js-activity-desc')[0]) {
      $('.js-activity-desc').children().last().slideUp();
    }
  });
});
</script>
</body>
</html>